package com.example.alteroracle.service.impl;


import com.example.alteroracle.dao.mapper.StudentMapper;
import com.example.alteroracle.dao.repository.StudentRepository;
import com.example.alteroracle.pojo.po.Student;
import com.example.alteroracle.service.StudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


@Slf4j
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Autowired
    private StudentRepository studentRepository;

    @Override
    public List<Student> getStudent() {
        List<Student> list = studentRepository.list();
        log.debug("list={}",list);
        return list;
    }

    @Override
    public void addStudent(Student student) {

        studentRepository.save(student);
    }
}
